const Koa = require('koa')
const app = new Koa()
const webpack = require('webpack');
var webpackMiddleware = require("koa-webpack-dev-middleware")

const config = require('./webpack.config.js');
const compiler = webpack(config);

app.use(webpackMiddleware(compiler, {
    // all options optional

    noInfo: false,
    // display no info to console (only warnings and errors)

    quiet: false,
    // display nothing to the console

    lazy: true,
    // switch into lazy mode
    // that means no watching, but recompilation on every request

    watchDelay: 300,
    // delay after change (only lazy: false)

    publicPath: "/",
    // public path to bind the middleware to
    // use the same as in webpack
    stats: {
        colors: true
    }

}));




app.listen(3000)
console.log('[demo] start-quick is starting at port 3000')